package com.queming.core.mapper;

import com.queming.core.dto.FileDto;
import com.queming.core.dto.FileUploadRequest;
import com.queming.core.entity.File;
import com.queming.core.vo.FileVo;
import org.mapstruct.DecoratedWith;
import org.mapstruct.Mapper;

/**
 * @author chencidiao
 * @date 2022/05/04 13:47
 * @DecoratedWith(FileMapperDecorator.class):指定装饰类
 **/
@Mapper(componentModel = "spring")
@DecoratedWith(FileMapperDecorator.class)
public interface FileMapper {
    File createEntity(FileUploadRequest fileUploadRequest) ;

    FileVo toVo(FileDto fileDto);

    FileDto toDto(File file);
    File toEntity(FileDto fileDto);
}
